﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>中国信息服务</title>
<script type="text/javascript" src="<c:url value='/admin/js/util/jquery-1.8.1.min.js' />" ></script>
<script type="text/javascript" src="<c:url value='/admin/js/util/validate.js' />" ></script>
<link href="<c:url value='/admin/css/login.css'/>" rel="stylesheet" type="text/css" />
<script type="text/javascript">
if (window != top) {
	top.location.href = location.href;
}

function submitForm() {
	if (validate()) {
		$("#mainForm").attr("action", "<c:url value='/admin/frameAction!loginExc.do'/>");
		$("#mainForm").submit();
	}
}

function enterEvent() {
	if (event.keyCode == 13) {
		submitForm();
	}
}

function flushCode() {
	$("#securityCodeImg").attr("src", "<c:url value='/admin/securityCode.jsp?random='/>" + Math.random());
}

function validate() {
	if (!validateLength("userName",1,20))
		return false;
	if (!validateLength("userPwd",4,20))
		return false;
	if (!validateLength("securityCode",1,4))
		return false;
	return true;
}
</script>
</head>
<body>
	<form id="mainForm" action="" method="post">
		<div id="wrap">
	    	<div id="main">
				<img src="<c:url value='/admin/images/loginLogo.jpg'/>" class="imgLogo" />
	            <div id="login">
	            	<ul>
	                	<li>用户名：<input name="userName" id="userName" type="text" /></li>
	                    <li>密　码：<input name="userPwd" id="userPwd" type="password" /></li>
	                    <li class="yzm">验证码：<input name="securityCode" id="securityCode" type="text" onkeydown="enterEvent()"/><img id="securityCodeImg" src="<c:url value='/admin/securityCode.jsp'/>" onclick="flushCode()" title="点击刷新"/></li>
	                </ul>
	                <span><a href="javascript:submitForm();"><img src="<c:url value='/admin/images/go.jpg'/>" width="110" height="37" /></a><a href="javascript:document.getElementById('mainForm').reset();"><img src="<c:url value='/admin/images/exit.jpg'/>" width="110" height="37" /></a></span>
	            </div>
	        </div>
	    </div>
	    <div class="tips">技术支持：阿布工作室</div>
	</form>    
</body>
</html>
